<!DOCTYPE html>
<html lang="Zh">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content=""kid1999>
    <title>{% block title %}{% endblock %}</title>    <!--标题扩展-->
    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css">
     {% block header %}{% endblock %}   <!--头部文件扩展-->
</head>
<body>
    <div class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="nav-header">
                <a class="navbar-brand" href="{% url 'index' %}">网站主页</a>
                <button type="button" class="navbar-toggle collapsed" data-target="#navbar-collapse" data-toggle="collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div id="navbar-collapse" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li class=""><a href="/">主页</a></li>
                    <li><a href="/admin/" target="_blank">后台测试</a></li>
                    {% if user.is_authenticated %}
                        <li class="pull-right">
                            <div class="dropdown">       <!--右对齐-->
                                <button class="btn btn-default dorpdown-toggle " type="button" data-toggle="dropdown">
                                    {{ user }}
                                    <span class="caret"></span>  <!--下拉箭头-->
                                </button>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu3">
                                    <li><a href="{% url 'userpage' %}" role="menuitem">后台管理</a></li>
                                    <li><a href="{% url 'setFileName' %}?user={{ user }}" role="menuitem">新建文件收集柜</a></li>
                                    <li><a href="{% url 'exit' %}" role="menuitem">注销</a></li>
                                </ul>
                            </div>
                        </li>
                    {% else %}
                         <li><a href="{% url 'login' %}" class="btn btn-default">登录/注册</a>
                    {% endif %}
                </ul>
            </div>
        </div>
    </div>

<div>{% block content %}{% endblock %}</div>    <!--主题内容扩展-->

</body>

<script src="/static/bootstrap-3.3.7/js/jquery-3.3.1.min.js"></script>
<script src="/static/bootstrap-3.3.7/js/bootstrap.min.js"></script>

<!-- 尾部信息 -->
{% block footer %}{% endblock %}
</html>